home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 1
/
Cream of the Crop 1.iso
/
UTILITY
/
TASEXAM6.ARJ
/
VOLBRK2A.TAS
< prev
next >
Wrap
Text File
|
1992-04-15
|
5KB
|
140 lines
{
SCRIPT : VOLBRK2A.TAS
Output File => VOLBRK.LST Or Printer LPT1
Author : Peter Ross
Date : 12/12/91
This script will SCREEN for volume breakouts of stocks that closed
at the same or higher than yesterday, and are 15% or less from their 52
week high.
In addition, it will ALERT you to those stocks that have had a 30
day price breakout, and when a new high has been reached.
Modifications: Frank Wolynski
Date : 02/09/92
Modifications were made to Peter's TAS file to allow single line
printouts of the security. Also rearranged prior close & current close
and included percentage change for the day. Since only securities
exhibiting the necessary volume breakout percentages were allowed
through the test, it was not necessary to identify the securities
as having done so.
Modifications: Jerry Green
Date : 03/11/92
Modified to show OBV yearly high. Plus some comment changes.
Modifications: Domenic Bianco
Date : 04/15/92
Changed Output for Megatech users delete Full_Name
Changed Calculation of Break Out Volume to agree with Investors Business
Daily Calculation and default to 50 day moving average of volume.
Changed definition of a Volume Breakout.
}
#MAX_QUOTES 262
{#OUTPUT_FILE 'VOLBRK.LST+'} {Change brackets for Alternate Output}
#output_file 'lpt1'
#INDEX 'sp-500' {Ticker must exist. Used for Relative Strength IBD type}
IF FIRST_TICKER THEN
begin
{**********************************************************}
{ Count the Total Tickers in your Directories }
{**********************************************************}
TOTAL := 0;
WRITELN(' Prev Curr',
' Price Curr OFF');
WRITELN('TICKER CLOSE CLOSE',
' Change Vol % HIGH');
WRITELN('-------- ------- -------',
' ------ ----- ----');
end;
{ #SCAN_DATE '920206' }
{**********************************************************}
{ NOTE: STOCKS IN DATABASE WITH LESS THAN 262 QUOTES WILL }
{ NOT BE FLAGGED. }
{**********************************************************}
if quote_count < 262 then
GOSUB FINI;
{**********************************************************}
{ Parameter settings follow. }
{ These parameters can be changed to suit you. }
{**********************************************************}
{ Price breakout lookback period, Volume breakout lookback }
{ period, and Percentage for VOLUME BREAKOUT }
{**********************************************************}
PRICE_BREAKOUT_PERIOD = 30;
VOL_BREAKOUT_PERIOD = 50;
VOL_PERCENT = 49;
{**********************************************************}
{ Declare various arrays to hold the results of indicators }
{**********************************************************}
HHV_A : ARRAY; { Place to save HHV }
VOL_A : ARRAY; { Place to save Volume Moving average }
OBV_A : ARRAY; { Place to save On Balance Volume }
RS : ARRAY; { Save Relative Strength to SP-500 Index }
OFS : ARRAY; {Initial Offset Array for RS}
high_obv : array;
PRICE_BREAKOUT = 0;
VOL_BREAKOUT = 0;
OBV_BREAKOUT = 0;
RELST_BREAK = 0;
{****** CALCULATE RELATIVE STRENGTH ARRAY AND FIND HIGH VALUE ******}
RS = mulby(div(c,index),100)
set(ofs,rs[1]);
rs=sub(rs,ofs);
HIRS =HHV(rs,52*5);
{**********************************************************}
{ The next few lines find the % from the 52 week high. }
{**********************************************************}
HHV_A = HHV(C,PRICE_BREAKOUT_PERIOD);
VOL_A = MOV(V,VOL_BREAKOUT_PERIOD,'S');
OBV_A = OBV();
high_value = HHV(h,52*5);
off_high_value = ((high_value - c[0]) / high_value) * 100;
day_change = roc(c,1,'%');
high_obv = HHV(OBV_A,52*5);
off_obv_high = ((high_obv - OBV_A) / high_obv) * 100;
IF CLOSE OF TODAY IS GREATER THAN HHV_A OF YESTERDAY THEN
begin
PRICE_BREAKOUT = 1;
end;
IF ((V-VOL_A)/VOL_A) >
VOL_PERCENT/100 THEN
begin
VOL_BREAKOUT = 1;
end;
IF OBV_A OF TODAY IS GREATER THAN high_obv OF YESTERDAY THEN
begin
OBV_BREAKOUT = 1;
end;
IF RS >= HIRS
begin
RELST_BREAK =1;
end;
TOTAL := TOTAL + 1;
IF VOL_BREAKOUT =1 AND OFF_HIGH_VALUE < 16
AND CLOSE OF TODAY >= CLOSE OF YESTERDAY
THEN
BEGIN
WRITE(ticker, close of yesterday,
close,INT(day_change),'%',
INT(((V-VOL_A)/VOL_A) *100),'% '
,INT(off_high_value),'%',' ');
IF PRICE_BREAKOUT THEN
WRITE(' 30HI');
IF OBV_BREAKOUT THEN
WRITE(' OB ');
IF high_value <= h then
write(' $ ');
IF RELST_BREAK =1 then
write(' RSHI');
writeln();
GOSUB FINI;
END;
:FINI
IF LAST_TICKER THEN
BEGIN
writeln('');
writeln('');
WRITELN('Total Companies Processed',' ',INT(TOTAL));
WRITELN(' OB INDICATES NEW YEARLY ON BALANCE VOLUME HIGH');
WRITELN(' $ INDICATES NEW 52 WEEK HIGH PRICE');
WRITELN(' RSHI Indicates New Relative Strength VS SP-500 High');
writeln('\p');
END;